<?php

class Usuarios_Model_DbTable_Perfil extends Zend_Db_Table_Abstract
{

    protected $_name = 'perfil';
    protected $_primary = 'id';
    protected $_dependentTables = array('Recursos_Model_DbTable_Permissao');
    protected $_referenceMap = array
    (
    		'Perfil' => array(
    				'refTableClass' => 'Usuarios_Model_DbTable_Usuarios',
    				'refColumns' => 'id_perfil',
    				'columns' => 'id',
    				'onDelete' => self::RESTRICT,
    				'onUpdate' => self::RESTRICT
    		)
    );
    
    
    
    public function fillSelectPerfil($order = 'nome') {
    	$sql = $this->select()->from($this->_name, array('id', $order))->order($order);
    	return  $this->getAdapter()->fetchPairs($sql);
    	
    }
    
    


}

